/**
 * 字典类型模块
 */
layui.config({
  base: '/'
}).extend({
  flying: 'flying'
}).define(['index', 'flying'], function (exports) {  //先加载index模块，里面配置了全局的入口
  const $ = layui.$
      ,admin = layui.admin
      ,flying = layui.flying
      ,form = layui.form
      ,table = layui.table
      ,layer = layui.layer
      ,dropdown = layui.dropdown;

  flying.table({
    elem: '#LAY-dict-type-table',
    url: '/system/dict/type/page', //数据接口
    cols: [
        // {type: 'checkbox', fixed: 'left'}
        {type: 'numbers', fixed: 'left', title: '序号'}
        , {field: 'dictDesc', title: '名称', minWidth: 100}
        , {field: 'dictType', title: '类型', minWidth: 100}
        , {field: 'status', title: '状态', minWidth: 90, templet: '#switchTpl', unresize: true}
        , {field: 'remark', title: '备注', minWidth: 80}
        , {field: 'updatedBy', title: '修改人', minWidth: 90}
        , {field: 'updatedTime', title: '修改时间', templet: '<div>{{ layui.util.toDateString(d.updatedTime, "yyyy-MM-dd HH:mm:ss") }}</div>', minWidth: 170}
        , {title: '操作', width: 160, align: 'center', fixed: 'right', toolbar: '#dict-type-table'}
    ]
  });

  //对外暴露的接口
  exports('dictType', {});
});